import { createApp } from "vue";
import "./style/index.less";
import router from "./router/index";
import App from "./App.vue";
import "./style/index.less";
import "vant/lib/index.css";
import { Toast } from "vant";
import { setupStore } from "~/store";
// 计算设置rem的基准值，即html的font-size
import "amfe-flexible";

const app = createApp(App);
app.use(Toast);

(window as any).VANT = {
	Toast,
};

function setupApp() {
	// 挂载vuex状态管理
	setupStore(app);
	app.use(router);
	// app.directive
	app.mount("#app");
}
setupApp();
